package com.hhf.rrd.fraud_detection;

import com.alibaba.fastjson.JSON;
import com.hhf.rrd.fraud_detection.model.AlertInfo;
import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;

/**
 * socket sink
 *
 * @author huanghaifeng15
 * @date 2022/2/11 17:06
 **/
public class AlertSink extends RichSinkFunction<AlertInfo> {
    @Override
    public void invoke(AlertInfo value, Context context) throws Exception {
        super.invoke(value, context);
        value.setAlterMsg("该账户有被欺诈风险！！！！！！");
        System.out.println(JSON.toJSONString(value,true));
    }
}
